package org.example.springoauth2.resourceserver2.controller;

import org.example.springoauth2.securitycommon.config.Inner;
import org.example.springoauth2.securitycommon.entity.SysUser;
import org.example.springoauth2.securitycommon.util.SecurityUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hzq
 * @date 2021/9/13 13:58
 */
@RestController
public class BaseController {

    @GetMapping("/user/info")
    public SysUser userInfo() {
        return SecurityUtils.getSysUser();
    }

    @Inner(false)
    @GetMapping("/server/info")
    public String serverInfo() {
        return "resource-server2";
    }
}
